package com.adnaan.backend.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
@TableName("order_list")
@Schema(description = "订单信息")
public class Order {

    @TableId(type = IdType.AUTO)
    @Schema(description = "主键ID")
    private Long id;

    @Schema(description = "订单编号")
    private String orderNo;

    @Schema(description = "购买用户ID")
    private Long userId;

    @Schema(description = "商品ID")
    private Long goodsId;

    @Schema(description = "商品名称")
    @TableField(exist = false)
    private String goodsName;

    @Schema(description = "商品价格")
    @TableField(exist = false)
    private BigDecimal goodsPrice;

    @Schema(description = "商品图片")
    @TableField(exist = false)
    private String goodsImage;

    @Schema(description = "供货商ID")
    private Long supplierId;

    @Schema(description = "数量")
    private Integer quantity;

    @Schema(description = "总金额")
    private BigDecimal totalAmount;

    @Schema(description = "状态：0-待支付 1-待发货 2-已发货 3-已完成 4-已取消")
    private Integer status;

    @Schema(description = "收货人姓名")
    private String consignee;

    @Schema(description = "收货人电话")
    private String mobile;

    @Schema(description = "收货地址")
    private String address;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "更新时间")
    private Date updateTime;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "售后id(不为空表示有售后)")
    @TableField(exist = false)
    private Long afterSalesId;
} 